#include <iostream>

#include "App.h"

Y::Nidhoggr * App = new Y::Nidhoggr();

#include "glutWrapper.h"

#define WINDOW_WIDTH 1024
#define WINDOW_HEIGHT 768

#define WINDOW_X 30
#define WINDOW_Y 30


int main (int argc, char * argv[]) {
	srand(time(NULL));
	
	App = new Y::Nidhoggr();
	App->arg( argc, argv );
	
	glutInit(&argc, argv);
	glutInitWindowSize(WINDOW_WIDTH,WINDOW_HEIGHT);
	glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE | GLUT_MULTISAMPLE);
	(void)glutCreateWindow("GLUT wrapped");
	glutPositionWindow(WINDOW_X,WINDOW_Y);
	
	glutDisplayFunc(paintGL);
	glutReshapeFunc(resizeFunc);
	glutKeyboardFunc(keyFunc);
	glutKeyboardUpFunc(keyUpFunc);
	glutSpecialFunc(specialFunc);
	glutSpecialUpFunc(specialUpFunc);
	glutMouseFunc(mouseFunc);
	glutMotionFunc(motionFunc);
	glutPassiveMotionFunc(passiveMotionFunc);
	glutTimerFunc(15,timer,0);
	
	App->initGL();
	App->resizeGL(WINDOW_WIDTH,WINDOW_HEIGHT);
	
	glutMainLoop();
    return 0;
}
